def my_gen():
    yield 1
    yield 2
    yield 3
    yield 4


gen = my_gen()
print(next(gen))
print(gen)
print(next(gen))
print(next(gen))
print(next(gen))
